package Day2025_03_26;

import java.util.Scanner;

public class Demo06 {
    static int[] dx = {-2, -1, 1, 2, -2, -1, 1, 2};
    static int[] dy = {1, 2, 2, 1, -1, -2, -2, -1};
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int m = in.nextInt(), n = in.nextInt(), x = in.nextInt(), y = in.nextInt();
        int[][] arr = new int[m + 1][n + 1];
        if (x >= 0 && x < m + 1 && y >= 0 && y < n + 1) arr[x][y] = -1;
        for (int i = 0; i < 8; i++) {
            int a = x + dx[i], b = y + dy[i];
            if (a >= 0 && a < m + 1 && b >= 0 && b < n + 1) arr[a][b] = -1;
        }
        long[][] dp = new long[m + 1][n + 1];
        for (int i = 0; i <= m; i++) {
            if (arr[i][0] == -1) break;
            dp[i][0] = 1;
        }
        for (int i = 0; i <= n; i++) {
            if (arr[0][i] == -1) break;
            dp[0][i] = 1;
        }
        for (int i = 1; i <= m; i++) {
            for (int j = 1; j <= n; j++) {
                if (arr[i][j] != -1) dp[i][j] += dp[i - 1][j] + dp[i][j - 1];
            }
        }
        System.out.println(dp[m][n]);
    }
}
